package com.fesine.ch01.lesson08.suspendResumeDealLock;

/**
 * @Author: Fesine
 * @CreateDate:2016/6/27
 * @UpdateUser:修改人名称
 * @UpdateDate:2016/6/27
 * @UpdateRemark:修改具体的内容
 */
public class SynchronizedObject {
    synchronized public void printString() {
        System.out.println("begin");
        if (Thread.currentThread().getName().equals("a")) {
            System.out.println("a线程永远 suspend 了");
            Thread.currentThread().suspend();
        }
        System.out.println("end");
    }
}
